package ru.ifmo.rybakov.muclumon.analysis;

public class Relation {
	private double[] input;
	
	private double output;
	
	public Relation(double[] input, double output) {
		this.input = input;
		this.output = output;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Relation) {
			Relation other = (Relation) obj;
			if (input.length != other.input.length) {
				return false;
			}
			if (output != other.output) {
				return false;
			}
			for (int i = 0; i < input.length; i++) {
				if (input[i] != other.input[i]) {
					return false;
				}
			}
			return true;
		}
		return super.equals(obj);
	}
	
	public double[] getInput() {
		return input;
	}
	
	public double getOutput() {
		return output;
	}
}
